#ifndef FEEDRSS_H
#define FEEDRSS_H

#include <QDomDocument>
#include <QUrl>
#include <QDate>
#include "mp3item.h"

class FeedRSS : public QDomDocument
{
public:
    //Constructor
    FeedRSS(const QString& feedContents);

    //Return the feed name
    QString getFeedName() const;
    QUrl    getFeedUrl() const;
    QDate   getFeedLastUpdate() const;

    //Parse the mp3s of the feed
    QList<Mp3Item> getMp3s();

private:
    QDomElement getFeedElement() const;
    QList<Mp3Item> getMp3sOfText(QString post) const;
    QString getContentsOfPost(const QDomElement& post) const;


    //static tags
    static const QString RssTag;
    static const QString ChannelTag;
    static const QString TitleTag;
    static const QString LinkTag;
    static const QString ItemTag;
};

#endif // FEEDRSS_H
